<!--_meta 作为公共模版分离出去-->
{include file="public/_meta"}


<article class="page-container">
    <form action="" method="post" class="form form-horizontal" id="form-send" enctype="multipart/form-rec">
        <input type="hidden" class="input-text" value="{$information.id}" placeholder="" id="" name="id">

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>用户名：</label>
            <div class="formControls col-xs-8 col-sm-9">
                {$information.username}
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>姓名：</label>
            <div class="formControls col-xs-8 col-sm-9">
                {$information.full_name}
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>手机：</label>
            <div class="formControls col-xs-8 col-sm-9">
                {$information.tel}
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>消息内容：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <textarea type="text" class="textarea" value="" placeholder="" id="" name="content">{$information.content}</textarea>
            </div>
        </div>
        <div class="row cl" >
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                <button class="btn btn-primary btn6 mr10 radius" type="submit">修改</button>
                <button onClick="parent.layer.close(parent.layer.getFrameIndex(window.name));" class="btn btn6 size-M radius" type="button">取消</button>            </div>
        </div>
    </form>
</article>

<!--_footer 作为公共模版分离出去-->
{include file="public/_footer"}

<script type="text/javascript">
    $(function(){
        $(".check_all").click(function(){
            $("input[type=checkbox]").attr("checked","checked");
        });
        /*$(".check_none").click(function(){
         $("input[type=checkbox]").removeAttr("checked");
         });*/
    });



    $("#form-send").validate({
        rules:{
        },
        onkeyup:false,
        focusCleanup:true,
        success:"valid",
        submitHandler:function(form){
            var rec = $(form).serializeArray();
            $(form).ajaxSubmit({
                type: 'post',
                url: "{:url('information/edit_information')}",
                recType: 'json',
                rec: rec,
                async : false,
                success: function(rec){
                    if(rec.status == false){
                        layer.msg(rec.message,{icon: 5,time:2000});
                    }else if(rec.status == true){
                        layer.msg(rec.message,{icon: 6,time:1000});
                        setTimeout(jump,1000);
                        function jump(){
                            parent.location.reload();
                        }
                    }else{
                        layer.msg(rec.message,{icon: 5,time:2000});
                    }
                },
            });
            //var index = parent.layer.getFrameIndex(window.name);
            //parent.$('.btn-refresh').click();
            //parent.layer.close(index);
        }
    });

</script>
